<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!--360浏览器优先以webkit内核解析-->
    <title> - 主页示例</title>
    <!--引入css文件-->
    <include file="common_css"/>
    <style>
        .red{color:red !important;}
        .org{color:#C97626 !important;}
        .final{color:#4e1c1c !important;}
    </style>
</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content">
        <div class="row">
            <div class="col-sm-12">
                <div class="row">
                    <div class="col-sm-4">
                        <div class="row row-sm text-center">
                            <div class="col-xs-6">
                                <div class="panel padder-v item">
                                    <div class="h1 text-info font-thin h1">{$count.user}</div>
                                    <span class="text-muted text-xs">MT4用户数</span>
                                    <div class="top text-right w-full">
                                        <i class="fa fa-caret-down text-warning m-r-sm"></i>
                                    </div>
                                </div>
                            </div>
                            <div class="col-xs-6">
                                <div class="panel padder-v item bg-info">
                                    <div class="h1 text-fff font-thin h1">{$count.agent}</div>
                                    <span class="text-muted text-xs">经纪人</span>
                                    <div class="top text-right w-full">
                                        <i class="fa fa-caret-down text-warning m-r-sm"></i>
                                    </div>
                                </div>
                            </div>
                            <div class="col-xs-6">
                                <div class="panel padder-v item bg-primary">
                                    <div class="h1 text-fff font-thin h1">${$count.gold}</div>
                                    <span class="text-muted text-xs">今日入金</span>
                                    <div class="top text-right w-full">
                                        <i class="fa fa-caret-down text-warning m-r-sm"></i>
                                    </div>
                                </div>
                            </div>
                            <div class="col-xs-6">
                                <div class="panel padder-v item">
                                    <div class="font-thin h1">${$count.rebate}</div>
                                    <span class="text-muted text-xs">佣金发放</span>
                                    <div class="bottom text-left">
                                        <i class="fa fa-caret-up text-warning m-l-sm"></i>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-8">
                        <div class="ibox float-e-margins">
                            <div class="ibox-title" style="border-bottom:none;background:#fff;">
                                <h5>职位数据</h5>
                            </div>
                            <div class="ibox-content" style="border-top:none;">
                                <!--<div id="flot-line-chart-moving" style="height:217px;border:1px solid red;"></div>-->
                                <table class="table">
                                    <thead>
                                        <tr><th>职位</th><th>人数</th></tr>
                                    </thead>
                                    <tbody>
                                        <volist name="position" id="vo">
                                            <tr><td>{$vo.user_position}</td><td>{$vo.count_member}</td></tr>
                                        </volist>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-5">
                        <div class="ibox float-e-margins">
                        <div class="" id="ibox-content">
                            <div id="vertical-timeline" class="vertical-container light-timeline">
                                <div class="vertical-timeline-block">
                                    <div class="vertical-timeline-icon navy-bg">
                                        <i class="fa fa-file-text"></i>
                                    </div>
                                    <div class="vertical-timeline-content">
                                        <h2>文档审核</h2>
                                        
                                        <span class="vertical-date">待审用户数 &nbsp;<small class="red">{$thing.examine}</small> 条</span>
                                    </div>
                                </div>

                                <div class="vertical-timeline-block">
                                    <div class="vertical-timeline-icon blue-bg">
                                        <i class="fa fa-usd"></i>
                                    </div>
                                    <div class="vertical-timeline-content">
                                        <h2>提款申请</h2>
                                        
                                        <span class="vertical-date">待处理申请 &nbsp;<small class="red">{$thing.gold}</small> 笔</span>
                                    </div>
                                </div>

                                <div class="vertical-timeline-block">
                                    <div class="vertical-timeline-icon lazur-bg">
                                        <i class="fa fa-coffee"></i>
                                    </div>
                                    <div class="vertical-timeline-content">
                                        <h2>职位申请</h2>
                                        
                                        <span class="vertical-date"> 待处理申请 &nbsp;<small class="org">{$thing.position_apply}</small> 条</span>
                                    </div>
                                </div>

                                <div class="vertical-timeline-block">
                                    <div class="vertical-timeline-icon yellow-bg">
                                        <i class="fa fa-file-word-o"></i>
                                    </div>
                                    <div class="vertical-timeline-content">
                                        <h2>工单处理</h2>
                                        
                                        <span class="vertical-date">待处理工单 &nbsp;<small class="org">{$thing.work_order}</small> 条</span>
                                    </div>
                                </div>

                                <div class="vertical-timeline-block">
                                    <div class="vertical-timeline-icon lazur-bg">
                                        <i class="fa fa-line-chart"></i>
                                    </div>
                                    <div class="vertical-timeline-content">
                                        <h2>杠杆申请</h2>
                                        
                                        <span class="vertical-date">待处理申请 &nbsp;<small class="final">{$thing.lever_apply}</small> 条</span>
                                    </div>
                                </div>

                                <!--<div class="vertical-timeline-block">-->
                                    <!--<div class="vertical-timeline-icon lazur-bg">-->
                                        <!--<i class="fa fa-user-md"></i>-->
                                    <!--</div>-->
                                    <!--<div class="vertical-timeline-content">-->
                                        <!--<h2>杠杆申请</h2>-->
                                        <!--<p>发年终奖啦，啦啦啦~~</p>-->
                                        <!--<span class="vertical-date">前天 <br><small>2月1日</small></span>-->
                                    <!--</div>-->
                                <!--</div>-->
                            </div>
                        </div>
                        </div>
                    </div>
                    <div class="col-sm-7">
                        <div class="ibox">
                            <div class="ibox-title">
                                <h5>最新公告</h5>
                                <!--<div class="ibox-tools">-->
                                    <!--<a href="projects.html" class="btn btn-primary btn-xs">创建新项目</a>-->
                                <!--</div>-->
                            </div>
                            <div class="ibox-content">
                                <!--<div class="row m-b-sm m-t-sm">-->
                                    <!--<div class="col-md-1">-->
                                        <!--<button type="button" id="loading-example-btn" class="btn btn-white btn-sm"><i class="fa fa-refresh"></i> 刷新</button>-->
                                    <!--</div>-->
                                    <!--<div class="col-md-11">-->
                                        <!--<div class="input-group">-->
                                            <!--<input type="text" placeholder="请输入项目名称" class="input-sm form-control"> <span class="input-group-btn">-->
                                                <!--<button type="button" class="btn btn-sm btn-primary"> 搜索</button> </span>-->
                                        <!--</div>-->
                                    <!--</div>-->
                                <!--</div>-->
                                <div class="project-list">
                                    <table class="table table-hover">
                                        <tbody>
                                        <volist name="news" id="va">
                                            <tr>
                                                <td class="project-title">
                                                    <a href="project_detail.html"><if condition="$va.type eq 2">公告 :&nbsp;</if>{$va.title}</a>
                                                    <br>
                                                    <small>创建于 {$va.add_time|date='Y-m-d H:i',###}</small>
                                                </td>
                                                <td class="project-people"></td>
                                                <td class="project-actions">
                                                    <a onclick="layer_show('公告详情','__APP__/User/Index/notice_OneData/id/{$va.id}',100,100)" class="btn btn-white btn-sm"><i class="fa fa-eye"></i> 查看 </a>
                                                    <!--<a href="__MODULE__/Index/article_save/id/{$va.id}" class="btn btn-white btn-sm"><i class="fa fa-pencil"></i> 编辑 </a>-->
                                                </td>
                                            </tr>
                                        </volist>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

        </div>
    </div>
    <!-- 全局js -->
    <include file="common_js"/>
    <!-- Flot -->
    <script src="__PUBLIC__/admin/js/plugins/flot/jquery.flot.js"></script>
    <script src="__PUBLIC__/admin/js/plugins/flot/jquery.flot.tooltip.min.js"></script>
    <script src="__PUBLIC__/admin/js/plugins/flot/jquery.flot.resize.js"></script>
    <script src="__PUBLIC__/admin/js/plugins/flot/jquery.flot.pie.js"></script>

    <!--flotdemo-->
    <script type="text/javascript">
		function layer_show(title,url,w,h){
            if (title == null || title == '') {
                title=false;
            };
            if (url == null || url == '') {
                url="404.html";
            };
            if (w == null || w == '') {
                w=800;
            };
            if (h == null || h == '') {
                h=($(window).height() - 50);
            };
            layer.open({
                type: 2,
                area: [w+'%', h +'%'],
                fix: false, //不固定
                maxmin: true,
                shade:0.4,
                title: title,
                content: url
            });
        }
        $(function() {
            var container = $("#flot-line-chart-moving");
            var maximum = container.outerWidth() / 2 || 300;
            var data = [];

            function getRandomData() {
                if (data.length) {
                    data = data.slice(1);
                }
                while (data.length < maximum) {
                    var previous = data.length ? data[data.length - 1] : 50;
                    var y = previous + Math.random() * 10 - 5;
                    data.push(y < 0 ? 0 : y > 100 ? 100 : y);
                }
                var res = [];
                for (var i = 0; i < data.length; ++i) {
                    res.push([i, data[i]])
                }
                //console.log(res);
                //return res;
            }
            /*var dat=[{0:0,1:100,'length':2},{0:1,1:90,'length':2}];*/
            series = [{
                data: getRandomData(),/*dat,*/
                lines: {
                    fill: true
                }
            }];
            var plot = $.plot(container, series, {
                grid: {

                    color: "#999999",
                    tickColor: "#f7f9fb",
                    borderWidth:0,
                    minBorderMargin: 20,
                    labelMargin: 10,
                    backgroundColor: {
                        colors: ["#ffffff", "#ffffff"]
                    },
                    margin: {
                        top: 8,
                        bottom: 20,
                        left: 20
                    },
                    /*markings: function(axes) {
                        var markings = [];
                        var xaxis = axes.xaxis;
                        for (var x = Math.floor(xaxis.min); x < xaxis.max; x += xaxis.tickSize * 2) {
                            markings.push({
                                xaxis: {
                                    from: x,
                                    to: x + xaxis.tickSize
                                },
                                color: "#fff"
                            });
                        }
                        return markings;
                    }*/
                },
                colors: ["#4fc5ea"],
                xaxis: {
                    tickFormatter: function() {
                        return "";
                    }
                },
                yaxis: {
                    min: 0,
                    max: 110
                },
                legend: {
                    show: true
                }
            });

            // Update the random dataset at 25FPS for a smoothly-animating chart

            /*setInterval(function updateRandom() {
                series[0].data = getRandomData();
                plot.setData(series);
                plot.draw();
            }, 40);*/
        });
    </script>
</body>

</html>
